package com.zj.study.utils.validation.annotation.constraint;


import com.zj.study.utils.validation.annotation.Constraint;
import com.zj.study.utils.validation.validator.digest.DigestValidatorForBigDecimal;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 校验 {@code BigDecimal} 小数位数最多多少位
 *
 * @author 谭耀飞
 * @since 2021.03.0
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Constraint(validateBy = DigestValidatorForBigDecimal.class)
public @interface Digest {

  /**
   * @return 最多多少位小数
   */
  int value();

  /**
   * @return 异常信息
   */
  String message() default "";

}
